Skip to content

feat: add Algolia day-based fallback for Ask/Show feeds - #124

Merged
therealsama merged 1 commit into
mainfrom
feat/ask-show-algolia-fallback
May 29, 2026
Merged

therealsama merged 1 commit into
mainfrom
feat/ask-show-algolia-fallback

Conversation

@therealsama

Copy link
Copy Markdown
Collaborator

When users exhaust the ~200 Firebase-ranked Ask/Show items, seamlessly continue loading older content day-by-day via Algolia (tags=ask_hn / tags=show_hn), mirroring the Top feed's historical fallback pattern.

  • Add fetchTaggedStoriesForDay generic helper + thin wrappers
  • Ask wrapper excludes hiring threads; Show wrapper has no exclusions
  • Add phaseRef to useInfiniteStories for firebase/algolia tracking
  • Intercept Firebase hasMore=false to transition seamlessly to Algolia
  • Algolia branch: day-loop with version guard per iteration, 5-day skip
  • Persist/restore phase in session state for back-nav correctness
  • Safety fallback for corrupt session blobs (position>200, no phase)
  • Add unit tests for API functions and integration tests for hook

@therealsama
therealsama requested a review from kplachkov as a code owner May 28, 2026 21:03
@therealsama
therealsama force-pushed the feat/ask-show-algolia-fallback branch from 88c54c5 to 6c6c711 Compare May 29, 2026 07:18
When users exhaust the ~200 Firebase-ranked Ask/Show items, seamlessly
continue loading older content day-by-day via Algolia (tags=ask_hn /
tags=show_hn), mirroring the Top feed's historical fallback pattern.

- Add fetchTaggedStoriesForDay generic helper + thin wrappers
- Ask wrapper excludes hiring threads; Show wrapper has no exclusions
- Add phaseRef to useInfiniteStories for firebase/algolia tracking
- Intercept Firebase hasMore=false to transition seamlessly to Algolia
- Algolia branch: day-loop with version guard per iteration, 5-day skip
- Persist/restore phase in session state for back-nav correctness
- Safety fallback for corrupt session blobs (position>200, no phase)
- Add unit tests for API functions and integration tests for hook
@therealsama
therealsama force-pushed the feat/ask-show-algolia-fallback branch from 6c6c711 to 53eb8ae Compare May 29, 2026 07:35
@therealsama
therealsama enabled auto-merge May 29, 2026 15:47
@therealsama
therealsama merged commit 3facd73 into main May 29, 2026
4 checks passed
@therealsama
therealsama deleted the feat/ask-show-algolia-fallback branch May 29, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants